/**   
 * Copyright © 2021 郑心怡. All rights reserved.
 * 
 * @Title:IUserInfoService.java 
 * @Prject: com.interesting.examsystem.user.service
 * @Package: com.interesting.examsystem.user.service
 * @author: ZhengXinyi   
 * @date: 2021-07-24
 * @version: V1.0   
 */
package com.interesting.examsystem.user.service;

import java.util.List;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.interesting.examsystem.common.exception.DuplicateUserNameException;
import com.interesting.examsystem.user.model.UserInfoDTO;
import com.interesting.examsystem.user.model.UserInfoVO;

/**
 * @ClassName: IUserInfoService
 * @Description:  服务接口
 * @author: ZhengXinyi
 * @date: 2021-07-24
 */
public interface IUserInfoService {
	/**
	 * @Title: selectPageVo
	 * @Description: 分页查询
	 * @param page
	 * @param userInfoDto
	 * @return
	 */
	Page<UserInfoVO> selectPageVo(Page<UserInfoDTO> page, UserInfoDTO userInfoDto);
	/**
	 * @Title: selectById
	 * @Description: 根据主键查询
	 * @param id
	 * @return
	 */
	UserInfoVO selectById(String id);
	/**
	 * @Title: selectOne
	 * @Description: 根据条件查询
	 * @param userInfoDto
	 * @return
	 */
	UserInfoVO selectOne(UserInfoDTO userInfoDto);
	/**
	 * @Title: deleteBatchIds
	 * @Description: 批量删除
	 * @param ids
	 * @return
	 */
	int deleteBatchIds(List<String> ids);
	/**
	 * @Title: insert
	 * @Description: 插入记录
	 * @param userInfoVo
	 * @return
	 */
	int insert(UserInfoVO userInfoVo) throws DuplicateUserNameException;
	/**
	 * 
	 * @Title: update 
	 * @Description: 修改记录
	 * @param userInfoVo
	 * @return
	 */
	int update(UserInfoVO userInfoVo);
	/**
	 * @Title: insertBatch 
	 * @Description: 批量插入
	 * @param userInfoVos
	 */
	void insertBatch(List<UserInfoVO> userInfoVos);

	/**
	 * 根据用户名称查询用户
	 * @param username
	 * @return
	 */
	UserInfoVO selectByName(String username);
}
